<script lang="ts" setup>
import { useUserInfoStore } from '../stores/userInfo'

const user = useUserInfoStore()
</script>
<template>
    <!-- 通过路由元信息进行判断是否显示页脚 -->
    <!-- <footer v-if="$route.meta.hidden" class="footer"> -->

    <footer class="footer">
        <router-link to="/home">
            <span class="iconfont icon-shouye"></span>
            <p>首页</p>
        </router-link>
        <router-link to="/kind">
            <span class="iconfont icon-fenlei"></span>
            <p>分类</p>
        </router-link>
        <router-link to="/cart">
            <span class="iconfont icon-gouwuche"></span>
            <p>购物车</p>
        </router-link>
        <router-link v-if="user.userid" to="/user">
            <span class="iconfont icon-My"></span>
            <p>我的</p>
        </router-link>
        <router-link v-else to="/login">
            <span class="iconfont icon-My"></span>
            <p>未登录</p>
        </router-link>
    </footer>
</template>